/**
 * @Description : 用户管理模块路由
 **/

const timeout = require("connect-timeout"); //设置访问超时
const express = require("express"); //express框架
const router = express.Router(); //express框架路由

const { register, login } = require("../../controller/infoController");
router.post("/register", timeout("5s"), register); // 用户注册
router.post("/login", timeout("5s"), login); // 用户登录

const { file, view } = require("../../controller/fileController");
router.all("/file", timeout("5s"), file); // 文件管理
router.all("/file/view", timeout("5s"), view); // 浏览文件

const { upload } = require("../../controller/uploadController");
router.all("/uploads", timeout("5s"), upload); // 上传文件

module.exports = router;
